/* FILE : ui.h */

#ifndef _UI_H
#define _UI_H

typedef struct {
	GtkWidget *window;
	GtkWidget *child;
	gboolean poppedup;
	GdkColor fg;
	GdkColor bg;
	int x;
	int y;
} WindowData;

typedef struct _LookupData {
	int num_cands;
	GtkWidget *cand[9];
	gboolean have_prev;
	gboolean have_next;
	gboolean is_phrase;
	int total_cands;
	int lu_curr_cand;
	int selected_item;
} LookupData;

void ui_init_preedit_window(void);
void ui_draw_preedit(int, int, char *);
void ui_hide_preedit(void);
void ui_preedit_realized(GtkWidget *, gpointer data);

void ui_init_lookup_data(void);
void ui_init_lu_horz_window(void);
void ui_init_lu_vert_window(void);
void ui_draw_lu_horz(int, int, const LookupData *);
void ui_draw_lu_vert(int, int, const LookupData *);
void ui_reposition_lu_horz(int, int);
void ui_reposition_lu_vert(int, int);
void ui_lu_horz_realized(GtkWidget *, gpointer);
void ui_lu_vert_realized(GtkWidget *, gpointer);
void ui_lu_horz_realized(GtkWidget *, gpointer);
void ui_vert_realized(GtkWidget *, gpointer);
void ui_hide_lookup(void);
LookupData *ui_parse_lookup_values(IM1Event *);

void ui_unparent_candidates(void);
void ui_init_attributes(void);
void ui_real_init_attributes(PangoFontDescription *, GdkColor*, GdkColor*);

#endif /* _UI_H */
